<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
<title>图书馆管理系统</title>
<!--  <link href="CSS/style.css" rel="stylesheet">-->

</head>
<%
		String name = "aaa";
		Cookie[] cookies =  request.getCookies();

		if(cookies!=null){
			for(int a=0;a<cookies.length;a++){
			System.out.println("d"+cookies[a].getName());
				if(cookies[a].getName().equals("uname")){
				
					name = cookies[a].getValue();
					
				}
			}
			
		}
		System.out.println("ne:"+name);
 %>
<body">
<form action="web" method="post">
	<table>
	<tr>
	<td>账户:</td>
	<td><input type="text" name="name" value="<%=name%>"></td>
	</tr>
	<tr>
	<td>密码:</td>
	<td><input type="password" name="pwd"></td>
	</tr>
	<tr>
	<td>Cookie保存</td>
	<td><input type="checkbox" name="checkbook" value="2"></td>
	
	</tr>
	<tr>
	<td><input type="submit" value="提交"></td>
	</tr>
	</table>

</form>

</body>
</html>
